//package servlet;
//
//import javax.servlet.ServletContext;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//import java.io.IOException;
//public class HiServlet extends HttpServlet {
//    @Override
//    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        ServletContext servletContext = req.getServletContext();
//        servletContext.setAttribute("name","韩顺平");
//        servletContext.setAttribute("name","老韩");
//        servletContext.removeAttribute("name");
//
//        HttpSession session = req.getSession();
//        session.setAttribute("age", 100);
//        session.setAttribute("age", 400);
//        session.removeAttribute("age");
//        System.out.println("Hiservlet");
//    }
//
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        doPost(req,resp);
//    }
//}
